#include "EpilFunctionNameCode.h"
#include "EpilOutputHelper.h"


EpilFunctionNameCode::EpilFunctionNameCode( const EpilLexLocation & location )
: EpilCodeBase( location )
{
}


EpilFunctionNameCode::~EpilFunctionNameCode()
{
}


tstring EpilFunctionNameCode::ToEpilCode( int indent ) const
{
	if( m_tableNames.empty() )
	{
		return m_name;
	}
	else
	{
		tstringstream ret;
		ret << EpilOutputHelper::GetListOutput( m_tableNames, t(".") );
		if( m_isMethod )
		{
			ret << t(":");
		}
		else
		{
			ret << t(".");
		}
		ret << m_name;
		return ret.str();
	}
}